#-*- Makefile -*-
include ../../gnuwin32/MkRules

all: ../../../bin/Rblas.dll

## suppress lots of warnings: this is a dummy
blas00.o: blas00.c
	$(CC) -O3 -I../../include  -c $< -o $@

## Rblas.dll imports xerbla_ from R.dll
ifeq ($(strip $(USE_ATLAS)),YES)
../../../bin/Rblas.dll: blas00.o ../../gnuwin32/dllversion.o
	@$(ECHO) -------- Building $@ --------
	$(DLL) -shared $(DLLFLAGS) -o $@ $^ Rblas.def \
	   -L../../../$(IMPDIR) -lR  -L"$(ATLAS_PATH)" -lf77blas -latlas
else
../../../bin/Rblas.dll: blas.o cmplxblas.o ../../gnuwin32/dllversion.o
	@$(ECHO) -------- Building $@ --------
	$(DLL) -shared $(DLLFLAGS) -o $@ $^ Rblas.def -L../../../$(IMPDIR) -lR $(FLIBS)
endif

distclean clean:
	@$(RM) ../../../bin/Rblas.dll *~ blas00.o blas00.d blas.o cmplxblas.o

